package com.zzyl.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
// @Component
public class DemoTask {
    /**
     * 定时执行该方法
     * cron = "0/5 * * * * ?"
     */
    @Scheduled(cron = "0/5 * * * * ?")
    public void task() {
        log.info("执行定时任务");
    }
}
